package com.annotation.demo5;

/**
 * @ClassName animal
 * @Description 动物类
 * @Author Kx
 * @Date 2025/3/30 14:29
 * @Version 1.0
 */
public class Animal {
    private String name;

    public Animal() {

    }
    public Animal(String name) {
        this.name = name;
    }

    /***
     * @author: kx
     * @date: 2025/3/30 14:54
     * @description: 动物吃东西的方法
    */
    public void eat(){
        System.out.println(name + "正在吃东西");
    }

    /***
     * @author: kx
     * @date: 2025/3/30 15:03
     * @description: 动物睡觉的方法
    */
    public void sleep(){
        System.out.println(name + "正在睡觉");
    }
}
